package com.syni.mdd.yhd.common.all.controller.protect.activity;

import com.syni.mdd.sjb.common.component.utils.common.annotations.CheckParams;
import com.syni.mdd.yhd.common.all.service.activity.OverMealService;
import com.syni.mdd.sjb.common.component.utils.common.utils.ParamsMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @className overlordMealController
 * @description TOO
 * @Author cfx
 * @DATE 2019/12/15 21:10
 * @VERSION 1.0
 **/
@RestController
@RequestMapping("/overlordMeal")
public class OverlordMealController {

    @Autowired
    OverMealService overMealService;

    /**
     * @Description 是否有这个活动
     * @Author: cfx
     * @Date: 2019/8/2
     */
    @PostMapping("openActivity")
    @CheckParams
    public Map<String,Object> openActivity(@RequestBody ParamsMap paramsMap){
        return overMealService.openActivity(paramsMap);
    }

    @PostMapping("getOverlordMealData")
    public Map<String,Object> getOverlordMealData(@RequestBody ParamsMap paramsMap){
        return overMealService.getOverlordMealData(paramsMap);
    }


    @PostMapping("smokeOverlordMeal")
    //@EntranceCheck(checkAuth = true)
    @CheckParams(checkAuth = true)
    public Map<String,Object> smokeOverlordMeal(@RequestBody ParamsMap paramsMap){
        return overMealService.smokeOverlordMeal(paramsMap);
    }

    @PostMapping("userHaveHum")
    @CheckParams(checkAuth = true)
    public Map<String,Object> userHaveHum(@RequestBody ParamsMap paramsMap){
        return overMealService.userHaveHum(paramsMap);
    }

    @PostMapping("userHelp")
    public Map<String,Object> userHelp(@RequestBody ParamsMap paramsMap){
        return overMealService.userHelp(paramsMap);
    }

    @PostMapping("userHelpRecord")
    @CheckParams(checkAuth = true)
    public Map<String,Object> userHelpRecord(@RequestBody ParamsMap paramsMap){
        return overMealService.userHelpRecord(paramsMap);
    }
}
